﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

namespace MrPP.SerriedCabinet
{
    public class GlobalConfigure : GDGeek.Singleton<GlobalConfigure>
    {
        public RespAreaColumnConfiguration.Data data{
            set;
            get;
        }

        public int getCount(byte index) {
            if(this.data != null) {
                int count = 0;
                foreach (var room in data.rooms) {
                    foreach (var area in room.areas) {
                        foreach (var column in area.columns) {
                            if (column.area == index) {
                                count++;
                            }
                        }
                    }
                }
                return count;
               
            }
            return 2;

        }
    }
}